#ifndef _DriverFile_H_
#define _DriverFile_H_


int8_t cFileInit(void);

int8_t cFileDirNew(char *pcPath);
int8_t cFileDirDel(char *pcPath);
int8_t cFileDirRename(char *pcPathOld, char *pcPathNew);
int8_t cFileDirRead(char *pcPath, int32_t iOrder, void *pvDatas, int32_t iLength);

int8_t cFileNew(char *pcPath);
int8_t cFileDel(char *pcPath);
int8_t cFileRename(char *pcPathOld, char *pcPathNew);
int32_t iFileSizeGet(char *pcPath);
int8_t cFileWrite(char *pcPath, int32_t iOffset, void *pvDatas, int32_t iLength);
int8_t cFileRead(char *pcPath, int32_t iOffset, void *pvDatas, int32_t iLength);

/* 以下几个函数需要在调用前加锁，全部调用结束后，再解锁 */
int8_t cFileOpen(char *pcPath);
int8_t cFileClose(void);
int8_t cFileOffsetSet(int32_t iOffset);
int8_t cFileWriteUnclose(int32_t iOffset, void *pvDatas, int32_t iLength);

uint32_t uiFileCrcGet(char *pcPath);


#endif
